import React from 'react';
import {Router, Route, Switch} from 'dva/router';
import IndexPage from './routes/IndexPage';
import {JRSXPage} from "./routes/JRSXPage";
import {RYKXPage} from "./routes/RYKXPage";
import {RXPage} from "./routes/RXPage";
import {RQPage} from "./routes/RQPage";
import {PinPaiPage} from "./routes/PinPaiPage";
import {GoodsTGPage} from "./routes/GoodsTGPage";

function RouterConfig({history}) {
  return (
    <Router history={history}>
      <Switch>
        <Route path="/index" component={IndexPage}/>
        {/*今日上新*/}
        <Route path="/jrsx" exact component={JRSXPage}/>
        {/*日用快消*/}
        <Route path="/rykx" exact component={RYKXPage}/>
        {/*热销*/}
        <Route path="/rx" exact component={RXPage}/>
        {/*人气*/}
        <Route path="/rq" exact component={RQPage}/>
        {/*品牌*/}
        <Route path="/pinpai" exact component={PinPaiPage}/>
        {/*商品推广页*/}
        <Route path="/goodstg" exact component={GoodsTGPage}/>
      </Switch>
    </Router>
  );
}

export default RouterConfig;
